home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 10
/
Amoszine 10 (Disk 3 of 3).adf
/
Text_Files.lha
/
pp_lib_amos.txt7
< prev
next >
Wrap
Text File
|
1995-12-11
|
1KB
|
66 lines
On 2 Jul 95 you wrote to me:
SS> After seeing what you told Andrew Johnson about crunching files
SS> with powerpacker library, i thought wouldnt it be good if i could
SS> uncrunch files without resorting to such commands as 'PPload' which
This is what started the thread off in the first place! You need to
use the ppLoadData function. Here is the code in my original reply to
Andrew:
'--- Decrunch colours ---
DCR_COL0=0
DCR_COL1=1
DCR_POINTER=2
DCR_SCROLL=3
DCR_NONE=4
'--- Memory types ---
MEM_ANY=0
MEM_CHIP=1
MEM_FAST=2
'--- Global ppLoadData variables ---
PP_COLOUR=DCR_NONE
PP_MEMTYPE=MEM_ANY
PP_BUFFER=0
PP_LENGTH=0
Global PP_COLOUR,PP_MEMTYPE,PP_BUFFER,PP_LENGTH
PPREAD[Fsel$('')]
If Param=0
Print "Loaded";PP_LENGTH;" bytes at ";Hex$(PP_BUFFER)
Else
Print "Error number ";Param
End If
'--- Free the memory (only if no errors) ---
If Param=0
Lib Open 1,"exec.library",0
Areg(1)=PP_BUFFER
Dreg(0)=PP_LENGTH
RESULT=Lib Call(1,-210)
Lib Close 1
End If
End
Procedure PPREAD[NAME$]
Lib Open 1,"powerpacker.library",0
NAME$=NAME$+Chr$(0)
Areg(0)=Varptr(NAME$)
Dreg(0)=PP_COLOUR
Dreg(1)=PP_MEMTYPE
Areg(1)=Varptr(PP_BUFFER)
Areg(2)=Varptr(PP_LENGTH)
RESULT=Lib Call(1,-30)
Lib Close 1
End Proc[RESULT]
See ya,
__
|_)_ _ _|
| (_|(_)l